<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>边框</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: #ababab;
        }

        .div1 {
            border: 2px solid #ff0000;
        }

        .div2 {
            /* 分开设置 */
            border-width: 2px;
            border-style: dashed;
            border-color: #00ff00;
        }

        .div3 {
            border: 2px solid #ff0000;
            /* 还可以单独设置上、下、左、右 */
            border-top: 2px dotted #0000ff;
            /* 甚至单独一侧的某个属性都可以 */
            border-right-style: groove;
            border-left-color: #ff00ff;
            /* 设置none表示没有边框 */
            border-bottom: none;
        }

        .p1 {
            border-style:ridge;
            border-color: #ff0000;
            width: 50px;
            height: 50px;
        }
    </style>
</head>
<body>
    <div class="div1"></div>
    <div class="div2"></div>
    <div class="div3"></div>
    <p class="p1"></p>
</body>
</html>